package com.iwhalecloud.citybrain.flow.platform.manager.application.service.impl;

import com.fasterxml.jackson.databind.JsonNode;
import com.iwhalecloud.citybrain.flow.platform.manager.application.common.context.ModelDeploymentContext;
import com.iwhalecloud.citybrain.flow.platform.manager.application.service.ModelDeploymentPostProcessor;
import com.iwhalecloud.citybrain.flow.platform.manager.domain.repository.FlowFormRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author: liyang
 * @date: 2021/10/8 22:16
 */
@Slf4j
@Component
public class SaveFlowFormFieldLimitProcessor extends SaveFormFieldLimitAbstractProcessor implements ModelDeploymentPostProcessor {

    @Autowired
    private FlowFormRepository flowFormRepository;

    @Override
    public void process(ModelDeploymentContext context) {
        JsonNode modelJson = context.getModelJson();
        saveFormField(modelJson,context.getDeployId(),"0");
    }


}
